package com.gjy.concurrency.queue;

import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-05-18 08:24:21
 */
public class ConcurrentTest {

    @Test
    public void test2() {
        Map<String, String> map
                = new HashMap<>();

        map.put("a", "1");
        map.put("c", "3");
        map.put("b", "2");

        System.out.println(map);
    }

    @Test
    public void test1() {
        ConcurrentSkipListMap<String, String> map
                = new ConcurrentSkipListMap<>();

        map.put("nav", "1");
        map.put("hello", "3");
        map.put("gjy", "2");

        System.out.println(map);
    }

    @Test
    public void test3() {
        Map<String, String> map
                = new LinkedHashMap<>();

        map.put("nav", "1");
        map.put("hello", "3");
        map.put("gjy", "2");

        System.out.println(map);
    }

}
